#include "stdafx.h"
#include "FPSClass.h"


CFPSClass::CFPSClass(void) : m_nFPS(0), m_nCount(0)
{
	m_ulStartTime = timeGetTime();
}


CFPSClass::~CFPSClass(void)
{
}

void CFPSClass::Initialize()
{

}

void CFPSClass::Frame()
{
	m_nCount += 1;

	if(timeGetTime() >= (m_ulStartTime + 1000))
	{
		m_nFPS = m_nCount;
		m_nCount = 0;

		m_ulStartTime = timeGetTime();
	}
}

int CFPSClass::GetFPS()
{
	return m_nFPS;
}